<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="index.js?a=1"></script>
</head>
<body>

</body>
<script>
	// 执行器函数支持异步。
	const p = new Promise((resolve, reject) => {
		setTimeout(() => {
			// resolve(0)
			reject(1);
		}, 1000)
	})
	const p1 = p.then(value => {
		return 200;
	},reason=>{
		return 100+reason;
	})
	console.log(p1);
</script>
</html>